<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" %>
<%@include file="include/include.jsp"%>CTYPE html>
<html lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="author" content="">
    <link rel="icon" href="static/assets/images/icon.png">
    <title>登录</title>
    <!-- Bootstrap 核心 CSS -->
    <link href="static/assets/bootstrap/css/bootstrap.min.css" rel="stylesheet">
    <!-- 自定义样式 -->
    <!-- HTML5 Shim 和 Respond.js 用于让 IE8 支持 HTML5元素和媒体查询 -->
    <!-- 注意： 如果通过 file://  引入 Respond.js 文件，则该文件无法起效果 -->
    <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
    <script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
    <![endif]-->
    <!-- jQuery (Bootstrap 的 JavaScript 插件需要引入 jQuery) -->
	<script src="static/assets/jquery/jquery-3.1.1.js"></script>
	<!-- 包括所有已编译的插件 -->
	<script src="static/assets/bootstrap/js/bootstrap.min.js"></script>
	<link rel="stylesheet" href="static/assets/ImgInput/css/ssi-uploader.css">
	<script src="static/assets/ImgInput/js/ssi-uploader.js"></script>
</head>
<body>
<div class="container">
	<div class="container">
		<h3>注意：因为演示中没有后台上传程序的支持，点击上传按钮时会返回错误信息！</h3>
		<div class="row">
			<div class="col-md-12">
				<h3>不带拖放区域：</h3>
				<button id="uploadButton">上传！！！</button>
				<input type="file" multiple id="ssi-upload3" name="file"/>
			</div>
		</div>
	</div>
</div>
<script type="text/javascript">
	$('#ssi-upload3').ssi_uploader({url:'${path}/test/imgUpload.do',
		dropZone:false,
		allowed:['jpg','jpeg','gif','txt','png','pdf'],
		onUpload:function(){
			//上传成功后将预览框隐藏
			uploadObj.clear();
		}});
	$(function(){
		$("#uploadButton").click(function(){
			if($(".ssi-imgToUpload").length==0){
				//没有选择图片，则执行另一个方法进行上传
				alert("没有选择图片！");
			}else{
				//否则上传文件，同时带上微博数据
				uploadObj.options.data={name:'abc'};
				uploadObj.uploadFiles();
			}
		});
	});
</script>
</body>
</html>